<?php
/**
 * 
 * @author tangbl
 *
 */
class AtlasAction extends CommonAction{
	
	
	public function index(){
		$article = D("Atlas");
		$lists   = $article->select();
		
		$rows    = array();
		foreach($lists as $k=>$v){
			$image        = find_thumb($v['solevar'],'single');
			$v['fileurl'] = $image['fileurl'];
			$rows[$k]     = $v ;
		}
		$this->assign("lists",$rows);
		$this->display();
	}
	
	public function detail(){
		$id     = $this->_param('id','intval',0);
		
		$article = D("Atlas");
		$data    = $article->find($id);
		$this->assign("article",$data);
		
		$single  = find_album($data['solevar'],'atlas');
		$this->assign("single",$single);

		$this->display();
	}
}
